package com.ttx.pattern.example.state.after.states;

import com.ttx.pattern.example.state.after.GumballMachine;
import com.ttx.pattern.example.state.after.State;

/**
 * 没有25分钱
 *  即没有投硬币
 * @author TimFruit
 * @date 2019/5/19 13:32
 */

public class NoQuarterSate implements State {
    private GumballMachine machine;

    public NoQuarterSate(GumballMachine gumballMachine) {
        this.machine = gumballMachine;
    }

    @Override public void insertQuarter() {
        System.out.println("投入25分硬币...");
        this.machine.setCurrState(machine.getHasQuarterState());
    }

    @Override public void ejectQuarter() { //当前状态下，不恰当的行为
        
    }

    @Override public void turnCrank() { //当前状态下，不恰当的行为
        
    }

    @Override public void dispense() { //当前状态下，不恰当的行为
        
    }
}
